<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>结构伪类</title>
</head>
<style>
    /* 找第三个子元素 */
    .box>:nth-child(3){
        color:aqua ;
    }
    /* 找与父元素同类型的第三个子元素 */
    .box>:nth-of-type(3){
        color:blue ;
    }
    .box>:first-child{
        color:blueviolet;
    }
    .box>:last-child{
        color:red;
    }
</style>
<body>
    <div class="box">
        <div>内容1</div>
        <span>内容2</span>
        <div>内容3</div>
        <div>内容4</div>
        <div>内容5</div>   
    </div>
</body>
</html>